/**
 * Description:
 * Class Name:DateTest
 * Date:2022/2/21 14:11
 *
 * @author LTisme
 * @version JAVA17
 */
package 疯狂Java讲义.第7章_Java基础类库._7_4_Java8的日期_时间类._7_4_1_Date类;

import java.util.Date;

public class DateTest {
    public static void main(String[] args) {
        var d1 = new Date();
        // 获取当前时间之后的100ms的时间
        var d2 = new Date(System.currentTimeMillis());
        System.out.println(d2);
        System.out.println(d1.compareTo(d2));
        System.out.println(d1.before(d2));
    }
}
